import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:love_app/enum/bind_lover.dart';
import 'package:love_app/providers/share_provider.dart';
import 'package:love_app/routes/application.dart';
import 'package:provider/provider.dart';

/// 用于判断是否有另一半， 如果没有则提醒去邀请
class HasLover extends StatelessWidget {
  // final String route;

  // const HasLover({Key key, this.route}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // final ShareProvider shareProvider =
    //     Provider.of<ShareProvider>(context, listen: false);
    // BindLover bindLover = shareProvider.bindLover;
    // if (bindLover == BindLover.hasBind) {
    //   // 如果有绑定另一半，则直接跳转
    //   Application.router.navigateTo(context, route);
    // }
    return CupertinoAlertDialog(
      title: Text("title"),
      content: Text("content"),
      actions: <Widget>[
        CupertinoDialogAction(
          child: Text('YES'),
          onPressed: () {
            print('yes...');
            Navigator.of(context).pop();
          },
        ),
        CupertinoDialogAction(
          child: Text('YES'),
          onPressed: () {
            print('yes...');
            Navigator.of(context).pop();
          },
        ),
      ],
    );
  }
}
